function capitalize(str) {  
    return str.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');  
  }  
    
    console.log(capitalize("a short sentence")); // 输出: A Short Sentence  
    console.log(capitalize("a lazy fox")); // 输出: A Lazy Fox  
    console.log(capitalize("look, it is working!")); // 输出: Look, It Is Working!

    module.exports = capitalize;